<extend name="Public/base" />
<block name="body">
    <!--PageContent-->
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Tables</h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <div class="row">
           <div class="col-md-12">
    <!--formBlock-->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        Basic Form Elements
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">

                        <div class="row">
                            <div class="col-lg-8">
                                <form action="" method="post" accept-charset="utf-8" role="form">
                <!--textInput-->
                                   
                                    <!--textInput-->
                                    <div class="form-group">
                                        <label>分类</label>
                                        <select class="form-control" name="category_id">
                                            <foreach name='plists' item='plist'>
                                            <option value ="{$plist.id}" <if condition=" isset($row['category_id']) AND ($row.category_id eq $plist['id']) ">selected='selected'</if> >{$plist.title}</option>
                                            </foreach>
                                        </select>
                                    </div>

                                    <!--textInput-->
                                    <div class="form-group">
                                        <label>title</label>
                                        <input class="form-control" name="title" value="{$row['title']||default=''}" placeholder="Enter text">
                                    </div>
                                   
                                    <!--textInput-->
                                    <div class="form-group">
                                        <label>文章摘要</label>
                                        <textarea class="form-control" rows="4" name="description">{$row.description|default=''}</textarea> 
                                    </div>
                                    <div class="form-group">
                                        <label>文章内容</label>
                                        <script id="editor" name="content" type="text/plain">{$row.content|default=''}</script>
                                    </div> 
                                    <div class="form-group">
                                        <label>推荐</label>
                                        <label class="radio-inline">
                                            <input type="radio" name="recommend" value="1" <if condition=" isset($row['recommend']) AND ($row.recommend eq 1) ">checked</if> >是
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="recommend"  value="0" <if condition=" isset($row['recommend']) AND ($row.recommend eq 0) ">checked</if> > 否
                                        </label>
                                    </div> 
                                    <div class="form-group">
                                        <label>状态</label>
                                        <label class="radio-inline">
                                            <input type="radio" name="status" value="1" <if condition=" isset($row['status']) AND ($row.status eq 1) ">checked</if> >正常显示
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="status"  value="0" <if condition=" isset($row['status']) AND ($row.status eq 0) ">checked</if> > 隐藏 
                                        </label>
                                    </div> 
                                   
                                     <input type="hidden" name="id" value="{$row.id|default=''}"/> 
                                    <!--/formBlock-divider-->

                                    <button type="submit" class="btn btn-default">Submit Button</button>
                                    <button type="reset" class="btn btn-default">Reset Button</button>
                                </form>
                            </div>
                        </div>

                    </div>
                </div>
                <!--/PageContent-divider-->
           </div> 
        </div>

    </div> 
    
</block>

<block name="script">
    <js href="__PUBLIC__/static/ueditor/ueditor.config.js" />    
    <js href="__PUBLIC__/static/ueditor/ueditor.all.min.js" />
    <script type="text/javascript">
        var ue = UE.getEditor('editor',{
            UEDITOR_HOME_URL : '__PUBLIC__/static/ueditor/',
            //serverUrl:'__PUBLIC__/ueditor/' + 'php/controller.php'      
        });
       /*
       var ue = UE.getEditor('container',{
        UEDITOR_HOME_URL:'__PUBLIC__/ueditor/',
        serverUrl:'__PUBLIC__/ueditor/' + 'php/controller.php'      
       });
       */
    </script>
</block>